package com.moming.mapper;

import com.moming.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    //用户登录查询用户
    @Select("select * from tb_user where username=#{username} and password=#{password}")
    User selectUser(@Param("username") String username, @Param("password") String password);

    //数据库添加用户
    //@Insert("insert into tb_user value(null,#{username},#{password}")
     void insertUser(User user);

     //根据用户名查询用户
    //@Select("select * from tb_us*er where username=#{username}")
    User selectUserName(@Param("username") String username);
}
